/**
 * Created by MSI on 2017/9/7.
 */
/**
 * Created by MSI on 2017/9/4.
 */
$(document).ready(function () {
    var videoid=window.location.href.split("?")[1];
    videoinfoinit(videoid);
});

function videoinfoinit(videoid){
    var videosrc;
    $.ajax({
        url:url+"public/getVideoInfo.do",
        data:{videoid:videoid},
        type:"get",
        datatype:"json",
        success:function (data) {
           videosrc=data.videosrc;
           console.log(videosrc)
            jwplayer('mediaplayer').setup({
                file: url+videosrc,//调用视频文件
                autostart:true,//自动播放
                width: "640",
                height: "480"
            });
            $("#Title").text("标题"+data.videoname);
            $("#date").text("发布时间:"+data.date);
        }
    });
}
